package com.jueecy.controller;

import com.jueecy.pojo.User;
import com.jueecy.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

@Controller
public class myController {

    @Autowired
    private UserService userService;

    @GetMapping("/login")
    public String pagesTest(){
        return "login";
    }

    @GetMapping("/index")
    public String index(){
        return "index";
    }

    @GetMapping("/person")
    public String person(){
        return "person";
    }

    @GetMapping("/want_buy")
    public String want_buy(){
        return "want_buy";
    }

    @GetMapping("/quit")
    public String quit(HttpServletRequest request){
        HttpSession session= request.getSession();
        session.invalidate();
        return "login";
    }

    @GetMapping("/userChat")
    public String userChat(){
        return "userChat";
    }

    @GetMapping("/alreadySell")
    public String alreadySell(){
        return "alreadySell";
    }


}
